package com.robam.cloud.component.componentfeign.basefeign;

import com.robam.cloud.common.bean.restful.entity.RespMsg;
import com.robam.cloud.common.bean.usercenter.entity.LoginAccount;
import com.robam.cloud.common.bean.usercenter.entity.User;
import com.robam.cloud.common.bean.usercenter.entity.UserSession;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user-center")
public interface FeignUserCenterBaseUtil {
    @RequestMapping(
            value = "feign/userCenter/initAccountUser",
            method = RequestMethod.POST)
    RespMsg<LoginAccount> initAccountUser(@RequestBody UserSession userSession);

    @RequestMapping(
            value = "feign/userCenter/realVerify",
            method = RequestMethod.GET)
    RespMsg<Boolean> realVerify(@RequestParam(value = "loginAccountId") Long loginAccountId);

    @RequestMapping(
            value = "feign/userCenter/queryUser",
            method = RequestMethod.GET)
    RespMsg<User> queryUser(@RequestParam(value = "loginAccountId") Long loginAccountId);

    @RequestMapping(
            value = "feign/userCenter/queryLoginAccount",
            method = RequestMethod.GET)
    RespMsg<LoginAccount> queryLoginAccount(@RequestParam(value = "loginAccountId") Long loginAccountId);

    @RequestMapping(
            value = "feign/userCenter/subscribeEvent",
            method = RequestMethod.GET)
    RespMsg subscribeEvent(@RequestParam(value = "wechatOpenId") String wechatOpenId);

    @RequestMapping(
            value = "feign/userCenter/unSubscribeEvent",
            method = RequestMethod.GET)
    RespMsg unSubscribeEvent(@RequestParam(value = "wechatOpenId") String wechatOpenId);
}
